<?php
/**
 * Author:   tangxiaowen
 * Email:    846506584@qq.com
 * Date:     2019/3/13 0013
 * Describe: 订单验证类.
 */

namespace app\index\validate;

use think\Validate;

class Order extends Validate
{
    protected $rule = [
        'orderId' => 'require',
        'payType' => 'require|between:1,2',
    ];

    protected $message = [
        'orderId' => ['require' => '订单ID不能为空'],
        'payType' => ['require' => '请选择支付方式', 'between' => '请正确选择支付方式类型值'],
    ];

    protected $scene = [
        'orderPay' => ['orderId', 'payType'],
        'orderStage' => ['orderId', 'payType'],
    ];
}
